import unittest

from HTMLTestRunner import HTMLTestRunner

if __name__ == '__main__':

    mytest = unittest.defaultTestLoader.discover(r"./", "Test*.py")

    with open(r"./testreport.html", 'wb') as f:
        runner = HTMLTestRunner(f, 1, '登陆测试报告', '用例执行详细信息')
        runner.run(mytest)

    f.close()
